using System;
using System.Linq;


namespace FoundationLib.Mail 
{
	/// <summary>
	/// An atomic mail data item.
	/// </summary>
	public class AtomicMailDataItem : MailDataItem 
	{
		/// <summary>
		/// The data item value
		/// </summary>
		private string value;

		/// <summary>
		/// Creates a new atomic mail data item.
		/// </summary>
		/// <exception cref="ArgumentNullException">A null-reference was passed.
		/// </exception>
		/// <param name="key">The data item key</param>
		public AtomicMailDataItem(string key) : base(key)
		{
		}

		/// <summary>
		/// Creates a new atomic mail data item.
		/// </summary>
		/// <exception cref="ArgumentNullException">A null-reference was passed.
		/// </exception>
		/// <param name="key">The data item key</param>
		/// <param name="value">The data item value</param>
		public AtomicMailDataItem(string key, string value) : this(key)
		{
			this.value = value;
		}

		/// <summary>
		/// Gets or sets the data item value.
		/// </summary>
		public virtual string Value
		{
			get
			{
				return this.value;
			}
			set
			{
				this.value = value;
			}
		}

	}

}